const Service = require('egg').Service

class UserService extends Service {

  async getUserList() {
    return this.app.model.User.findAll({
      attributes: ['id','username','headImg','status']
    })
  }

  async updateStatus(id,status) {
    return await this.app.model.User.update({
      status
    },{
      where:{
        id
      }
    })
  }

}

module.exports = UserService